POV-Ray : Newsgroups : povray.advanced-users : Use of povray functions to make fractals other than "famous" Mandelbrot with same scalability? : Re: Use of povray functions to make fractals other than "famous" Mandelbrot with same scalability? Server Time
29 Jul 2024 00:33:12 EDT (-0400)
  Re: Use of povray functions to make fractals other than "famous" Mandelbrot with same scalability?  
From: gimi
Date: 3 May 2003 07:47:24
Message: <3eb3ac4c@news.povray.org>
Warp wrote:
>   If POV-Ray supported recursive functions, then you could do them with
> those.
>   In fact, I implemented the Mandelbrot pattern as a recursive function
> in a prototype version of POV-Ray 3.5, and it worked ok (it was acceptably
> fast).

What du you need recursion for?  Most fractals I know of
(Mandelbrot included) are computed in simple iterations,
as in (pseudo-code):

FOR Y-coordinates [of the entire fractal image]
   FOR X-coordinates
     WHILE conditions (i.e.: |Z| < 4 AND num_loops < max_loops)
       Iterate function (i.e.: Z = Z*Z + C [Mandelbrot])
     END
     Draw Pixel
   END
END

Any end-recursive function can be written as an iteration.
And in most cases the iterative version will be faster.

> It's a bummer the recursion support didn't completely work out.

That is true, however. ;)

g.

-- 
++++++++++++++++ http://www.psico.ch/ ++++++++++++++++


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.